﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta content="en-au" http-equiv="Content-Language" />
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
<title>Better Robocopy GUI</title>
<style type="text/css">
.style1 {
	font-family: "Courier New", Courier, monospace;
	font-size: small;
	color: #800080;
}
</style>
</head>

<body>

<h1>Better Robocopy GUI, Get the Best of Both Worlds</h1>
<div style="text-align: right;">
	by Zijian Huang<br />
</div>
<br />
Robocopy is very good for making simple backup of important files, as well as 
massive copying of files of different scenarios.<br />
<br />
You have reasons of loving command line, and loving GUI.<br />
<br />
I would assume you already love Robocopy, and might also use Robocopy GUI at 
least once.<br />
<br />
I am a lazy person, while I love command line, I don&#39;t remember command line 
arguments. While Robocopy GUI has released some of my pains, the product still 
needs some face lifts to please our lazy and smart computer literates. We need 
Better Robocopy GUI to tame the awesome powers of Robocopy.<h2>Overview</h2>
The program was developed based on my preference of UI design:<ol>
	<li>Most if not all Screen elements are visible in one screen without much 
	tabbing on tab sheets or navigating multiple levels of windows, as long as 
	the layout of the elements is not too busy.</li>
	<li>Hints on command line arguments must come on handy, as I don&#39;t remember 
	the arguments.</li>
</ol>
The GUI components representing the command line arguments are presented in a 
property grid which maximizes the use of the vertical resolution of the screen. 
And an text editor windows maximizing the horizontal resolution of the screen is 
for editing command.<br />
<br />
You may construct a command line through modifying properties in the property 
grid, and you can edit the text of command line in the text editor window. And 
the changes you made in the editor window may be reflected back to the property 
grid. When you select a property in the property grid, or an argument in the 
text editor window, you will see the hint about the argument.<br />
<br />
Some options are just combinations of other options. The program will assist 
minimizing such redundant options.<br />
<br />
Surely you still need a standalone text editor like Notepad for editing scripts, 
while this Better Robocopy GUI should provide some helps for speeding up the 
drafting and testing of your scripts.<h3>Limitations</h3>
Better Robocopy GUI excludes the Job Options of Robocopy on purpose: if you use 
job files, you don&#39;t need GUI to construct options of Robocopy. <br />
<br />
Robocopy GUI from Microsoft includes a 35-page document &quot;Robocopy.exe Robust 
File Copy Utility Version XP010&quot;. This document is helpful for studying in-depth 
uses of Robocopy. As this document of Microsoft is copyrighted, I can not 
redistribute it. However, while the hints of Better Robocopy GUI are basically 
the replicates of Robocopy command line help, this is a fair use.<h2>
Requirements:</h2>
<ul>
	<li>Windows 2003/2008, XP, Vista, 7</li>
	<li>Microsoft .NET Framework 2.0</li>
	<li>Robocopy installed</li>
</ul>
<h2>Installation</h2>
The program comes with a single exe file which might be packaged in
<a href="http://www.fonlow.com/BetterRobocopyGUI/BetterRobocopyGUI.zip">a zip 
file primarily distributed at Fonlow.com</a>. You may extract and copy the exe 
file to where ever you like.<br />
<br />
<b>Remark: </b>You may be amazed that BetterRobocopyGUI.exe is so small, just 
around 58 KB while RobocopyGW.exe of Microsoft Robocopy GUI is about 212 KB. 
Technically, BetterRobocopyGUI dynamically generate GUI elements at runtime, 
while RobocopyGW has most GUI elements defined at design time, which were built 
into the exe file.<h2>Source Codes</h2>
The program was coded using C# of Visual Studio 2008, on .NET Framework 2. The 
package is located at
<a href="http://www.fonlow.com/BetterRobocopyGUI/BRG_Source.7z">
http://www.fonlow.com/BetterRobocopyGUI/BRG_Source.7z</a> .<br />
You are free to use for any legal activity and purpose, as long as you keep the 
credit to Zijian Huang.<h2><a name="License">License</a></h2>
<span style="font-size: 11pt; color: rgb(0, 0, 0); font-family: Times New Roman;">
SOFTWARE END-USER LICENSE AGREEMENT <br />
<br />
</span>
<span style="font-family: Helvetica,Arial; font-size: 10pt; color: rgb(0, 0, 0);">
Better Robocopy GUI is distributed as <span lang="en-us">FREEWARE</span>, with 
source codes available<br />
<br />
<span style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">
Copyright&nbsp; ©&nbsp; 2009-2010 </span></span>
<span style="font-size: 11pt; color: rgb(0, 0, 0); font-family: Times New Roman;">&nbsp;Zijian 
Huang</span><span style="font-family: Helvetica,Arial; font-size: 10pt; color: rgb(0, 0, 0);"><span style="font-family: Times New Roman; font-size: 12pt; color: rgb(0, 0, 0);">, 
All Rights Reserved.</span> <br />
<br />
This software is provided &quot;as-is,&quot; without any express or implied warranty. In 
no event shall the author be held liable for any damages arising from the use of 
this software. <br />
<br />
Permission is granted to anyone to use this software for individual or 
commercial purposes, provided that the following conditions are met: <br />
<br />
1. All redistributions of the Application files must retain all copyright 
notices that are currently in place, and this list of conditions without 
modification. <br />
<br />
2. All redistributions must retain all occurrences of the above copyright notice 
and web site addresses that are currently in place (for example, in the About 
boxes). <br />
<br />
3. The origin of this software must not be misrepresented; you must not claim 
that you wrote the original software. <br />
<br />
4. You <span lang="en-us">may </span>distribute Better Robocopy GUI with 
commercial 3rd. part software, but you can&#39;t charge for it. </span><br />
<h2>After-mark</h2>
The program and the codes are simple, and I would kept that way.<br />
<br />
If you are studying C# and .NET, you may find some typical use cases of some 
distinguish .NET technologies:<ul>
	<li>Reflection with TypeConverter, PropertyInfo</li>
	<li>PropertyGrid</li>
	<li>Regular Expression with Regex</li>
</ul>
Some more works might be needed to improve the quality of the codes:<ol>
	<li>Code Analysis of Visual Studio still gives lot of warnings against the 
	codes.</li>
	<li>The descriptions of the arguments as well as other GUI elements may need 
	be refactored for internationalization, if translating the GUI is needed in 
	the future.</li>
	<li>The codes may be decoupled from specializing in only Robocopy command. 
	Through refactoring, the codes may be re-used for providing GUI to other 
	command lines.</li>
</ol>
<p>You are very welcome to give comments and advices upon bugs and improvements.</p>
<h2>Hints</h2>
I have a laptop which goes to sleep often, and a Windows server that runs 24x7. 
For important files in my laptop, I would make a mirror backup every day to the 
Windows server. I put all Robocopy commands into a bat file which will be 
launched by a task in Windows Task Scheduler. The task will run every 2 am, and 
if the laptop is sleeping, the task will wake it up.<br />
<br />
From time to time, say, weekly, I would go to the Windows server, run similar 
Robocopy commands in a bat file, to copy the mirror backup into another mirror 
backup in a removable drive, which I would place in another geographic location.<br />
<br />
Here&#39;s an example:<br />
<span class="style1">@echo =========================================== &gt;&gt; 
xcopysync.log</span><br class="style1" />
<span class="style1">date /T &gt;&gt; xcopysync.log</span><br class="style1" />
<span class="style1">time /T &gt;&gt; xcopysync.log</span><br class="style1" />
<span class="style1">net use \\MyServer\bigd yzxlszy /user:zijian</span><br class="style1" />
<span class="style1">@echo ------------------------------------------- &gt;&gt; 
xcopysync.log</span><br class="style1" />
<span class="style1">if not exist \\MyServer\bigd\Backup goto end</span><br class="style1" />
<br class="style1" />
<span class="style1">robocopy D:\DelphiProjects 
\\MyServer\BIGD\Backup\Laptop\DelphiProjects /XF *.dcu *.dcuil *.exe *.bak *.~* 
/MIR /R:3 /W:10 &gt;&gt; xcopysync.log 2&gt;&amp;1</span><br class="style1" />
<span class="style1">robocopy D:\delphicomponents 
\\MyServer\BIGD\Backup\Laptop\delphicomponents /XF *.dcu *.dcuil *.exe *.bak 
*.~* /MIR /R:3 /W:10 &gt;&gt; xcopysync.log 2&gt;&amp;1</span><br class="style1" />
<span class="style1">robocopy D:\VSProjects 
\\MyServer\BIGD\Backup\Laptop\VSProjects /XF *.bak *.~* /XD bin obj /MIR /R:3 
/W:10 &gt;&gt; xcopysync.log 2&gt;&amp;1</span><br class="style1" />
<span class="style1">robocopy D:\DotNetcomponents 
\\MyServer\BIGD\Backup\Laptop\DotNetcomponents /XF *.bak *.~* /XD bin obj /MIR 
/R:3 /W:10 &gt;&gt; xcopysync.log 2&gt;&amp;1</span><br class="style1" />
<br class="style1" />
<span class="style1">:end</span><br />
<h2>References</h2>
<ul>
	<li>
	<a id="arw:" href="http://technet.microsoft.com/en-us/library/cc733145(WS.10).aspx" title="Robocopy reference in Microsoft Technet">
	Robocopy reference in Microsoft Technet</a></li>
	<li>
	<a id="ig0r" href="http://compdocs.blogspot.com/2007/01/robocopy-switches.html" title="Complentory reference at COMPDOCS">
	Complentory reference at COMPDOCS</a></li>
	<li>
	<a id="y011" href="http://technet.microsoft.com/en-us/magazine/2006.11.utilityspotlight.aspx" title="Gobocopy GUI">
	Robocopy GUI</a></li>
	<li>
	<a id="l8cn" href="http://technet.microsoft.com/en-us/magazine/2009.04.utilityspotlight.aspx?pr=blog" title="RichCopy">
	RichCopy</a><br />
	</li>
</ul>
<br />
<br />
<br />

</body>

</html>
